package IoCz;

import Book.Book;
import Book.BookList;

public class IoAdd implements IoCz{

    @Override
    public void ioCz(BookList bookList) {
        System.out.println("新增图书");
        System.out.println("请输入书名");
        String name = scanner.nextLine();
        System.out.println("请输入作者");
        String author = scanner.nextLine();
        System.out.println("请输入价格");
        int price = scanner.nextInt();
        Book book = new Book(name,author,price);
        bookList.setpos(bookList.booksize,book);
        bookList.booksize++;
        System.out.println("新增结果");
        IoShow ioShow = new IoShow();
        ioShow.ioCz(bookList);
    }
}
